
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Maven使用技巧 · tgor note</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="tgor">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../编码规范/Java编码规范.html" />
    
    
    <link rel="prev" href="../category/工具与规范.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Me
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../category/微服务.html">
            
                <a href="../category/微服务.html">
            
                    
                    微服务
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Java-Spring/Feign.html">
            
                <a href="../Java-Spring/Feign.html">
            
                    
                    HTTP客户端Feign
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../Java-其他库/限流.html">
            
                <a href="../Java-其他库/限流.html">
            
                    
                    限流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../运维/Nginx限流.html">
            
                <a href="../运维/Nginx限流.html">
            
                    
                    限流Nginx
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../Java-Spring/负载均衡.html">
            
                <a href="../Java-Spring/负载均衡.html">
            
                    
                    负载均衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../运维/Nginx负载均衡.html">
            
                <a href="../运维/Nginx负载均衡.html">
            
                    
                    负载均衡Nginx
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../Java-其他库/熔断Hystrix.html">
            
                <a href="../Java-其他库/熔断Hystrix.html">
            
                    
                    熔断Hystrix
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../Java-其他库/缓存.html">
            
                <a href="../Java-其他库/缓存.html">
            
                    
                    缓存
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="../Java-其他库/缓存.html">
            
                <a href="../Java-其他库/缓存.html#本地缓存">
            
                    
                    本地缓存
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html">
            
                    
                    分布式缓存Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.10" data-path="../Java-其他库/分布式事务.html">
            
                <a href="../Java-其他库/分布式事务.html">
            
                    
                    分布式事务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.11" data-path="../Java-其他库/分布式事务.html">
            
                <a href="../Java-其他库/分布式事务.html#事务消息">
            
                    
                    可靠事务消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.12" data-path="../Java-Spring/业务监控.html">
            
                <a href="../Java-Spring/业务监控.html">
            
                    
                    业务监控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.13" data-path="../Java-其他库/分布式定时作业.html">
            
                <a href="../Java-其他库/分布式定时作业.html">
            
                    
                    分布式作业调度ElasticJob
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.14" data-path="../Java-ORM/ORM.html">
            
                <a href="../Java-ORM/ORM.html">
            
                    
                    ORM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.15" data-path="../Java-其他库/分布式系统及CAP原理.html">
            
                <a href="../Java-其他库/分布式系统及CAP原理.html">
            
                    
                    分布式系统及CAP原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.16" data-path="../MQ/RabbitMQ笔记.html">
            
                <a href="../MQ/RabbitMQ笔记.html">
            
                    
                    消息驱动Rabbitmq
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../category/数据库.html">
            
                <a href="../category/数据库.html">
            
                    
                    数据库
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Mysql/经典数据库设计案例.html">
            
                <a href="../Mysql/经典数据库设计案例.html">
            
                    
                    mysql设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../Mysql/Mysql事务与锁.html">
            
                <a href="../Mysql/Mysql事务与锁.html">
            
                    
                    mysql事务与锁
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../Mysql/mysql数据类型.html">
            
                <a href="../Mysql/mysql数据类型.html">
            
                    
                    mysql数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../Mysql/mysql索引及查询.html">
            
                <a href="../Mysql/mysql索引及查询.html">
            
                    
                    mysql索引与查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../Mysql/mysql索引及查询.html">
            
                <a href="../Mysql/mysql索引及查询.html#查询语句设计准则">
            
                    
                    mysql查询语句设计准则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../Mysql/mysql性能测试.html">
            
                <a href="../Mysql/mysql性能测试.html">
            
                    
                    mysql性能测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../Mysql/mysql主从同步与读写分离.html">
            
                <a href="../Mysql/mysql主从同步与读写分离.html">
            
                    
                    mysql主从同步与读写分离
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="../Java-Spring/SpringBoot事务注解@Transactional.html">
            
                <a href="../Java-Spring/SpringBoot事务注解@Transactional.html">
            
                    
                    Spring事务注解@Transactional
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="../数据结构与算法/位运算应用实例.html">
            
                <a href="../数据结构与算法/位运算应用实例.html">
            
                    
                    位运算应用实例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="../Mongodb-Client/morphia-API汇总.html">
            
                <a href="../Mongodb-Client/morphia-API汇总.html">
            
                    
                    morphia API汇总
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="../Mongodb-Client/mongo驱动连接.html">
            
                <a href="../Mongodb-Client/mongo驱动连接.html">
            
                    
                    mongodb驱动与连接
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.12" data-path="../Mongodb/mongodb-ObjectId实践.html">
            
                <a href="../Mongodb/mongodb-ObjectId实践.html">
            
                    
                    mongodb ObjectId实践
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.13" data-path="../Mongodb/mongodb角色权限.html">
            
                <a href="../Mongodb/mongodb角色权限.html">
            
                    
                    mongodb角色权限
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../category/java并发.html">
            
                <a href="../category/java并发.html">
            
                    
                    Java并发
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../Java-Base/Java并发.html">
            
                <a href="../Java-Base/Java并发.html">
            
                    
                    Java并发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../Java-Base/Java并发.html">
            
                <a href="../Java-Base/Java并发.html#锁">
            
                    
                    Java并发之锁设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../Java-Base/Java并发.html">
            
                <a href="../Java-Base/Java并发.html#synchronized">
            
                    
                    Java并发之synchronized
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../Java-Base/Java之Lock.html">
            
                <a href="../Java-Base/Java之Lock.html#reentrantlock">
            
                    
                    Java Lock之ReentrantLock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../Java-Base/Java之Lock.html">
            
                <a href="../Java-Base/Java之Lock.html#reentrantreadwritelock">
            
                    
                    Java Lock之ReentrantReadWriteLock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html">
            
                    
                    Java Future
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html#futuretask">
            
                    
                    Java Future之FutureTask
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html#completablefuture">
            
                    
                    Java Future之CompletableFuture
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html#forkjointask">
            
                    
                    Java Future之ForkJoinTask
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="../Java-Base/Java之Thread.html">
            
                <a href="../Java-Base/Java之Thread.html">
            
                    
                    Java Thread
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../category/redis.html">
            
                <a href="../category/redis.html">
            
                    
                    Redis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html">
            
                    
                    Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#集群">
            
                    
                    Redis集群
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#消息订阅">
            
                    
                    Redis消息订阅
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#lua">
            
                    
                    Redis Lua脚本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#配置汇总">
            
                    
                    Redis配置汇总
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../category/运维.html">
            
                <a href="../category/运维.html">
            
                    
                    运维
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../运维/Linux常用操作汇总.html">
            
                <a href="../运维/Linux常用操作汇总.html">
            
                    
                    Linux常用操作汇总
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../运维/阿里云笔记.html">
            
                <a href="../运维/阿里云笔记.html">
            
                    
                    阿里云笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../category/nginx.html">
            
                <a href="../category/nginx.html">
            
                    
                    Nginx
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../运维/Nginx学习笔记.html">
            
                <a href="../运维/Nginx学习笔记.html">
            
                    
                    Nginx基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../运维/Nginx负载均衡.html">
            
                <a href="../运维/Nginx负载均衡.html">
            
                    
                    Nginx负载均衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../运维/Nginx限流.html">
            
                <a href="../运维/Nginx限流.html">
            
                    
                    Nginx限流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../运维/Nginx学习笔记.html">
            
                <a href="../运维/Nginx学习笔记.html#六、其他">
            
                    
                    Nginx客户端辅助技巧
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../category/容器化.html">
            
                <a href="../category/容器化.html">
            
                    
                    容器化
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../Docker/docker笔记.html">
            
                <a href="../Docker/docker笔记.html">
            
                    
                    Docker学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../Docker/docker笔记.html">
            
                <a href="../Docker/docker笔记.html#基础操作">
            
                    
                    Docker基础操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../Docker/docker笔记.html">
            
                <a href="../Docker/docker笔记.html#dockerfile">
            
                    
                    DockerFile
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../category/Web.html">
            
                <a href="../category/Web.html">
            
                    
                    Web
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../运维/Http入坑Https笔记.html">
            
                <a href="../运维/Http入坑Https笔记.html">
            
                    
                    Http入坑Https笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../Web/阿里云OSS.html">
            
                <a href="../Web/阿里云OSS.html">
            
                    
                    OSS
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../category/java基础.html">
            
                <a href="../category/java基础.html">
            
                    
                    Java基础
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../Java-Base/Java基础.html">
            
                <a href="../Java-Base/Java基础.html#jvm">
            
                    
                    JVM基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../Java-Base/Java基础.html">
            
                <a href="../Java-Base/Java基础.html#语法糖">
            
                    
                    Java语法糖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../Java-Base/Java基础.html">
            
                <a href="../Java-Base/Java基础.html#数据结构">
            
                    
                    Java数据结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" data-path="../Java-Base/Java8函数式编程.html">
            
                <a href="../Java-Base/Java8函数式编程.html">
            
                    
                    java8函数式编程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" data-path="../Java-Base/ArrayList源码分析.html">
            
                <a href="../Java-Base/ArrayList源码分析.html">
            
                    
                    JDK源码分析ArrayList
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" data-path="../Java-Base/HashMap源码分析.html">
            
                <a href="../Java-Base/HashMap源码分析.html">
            
                    
                    JDK源码分析HashMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.7" data-path="../Java-Base/Java注解.html">
            
                <a href="../Java-Base/Java注解.html">
            
                    
                    Java注解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.8" data-path="../Java-Base/Timsort排序算法.html">
            
                <a href="../Java-Base/Timsort排序算法.html">
            
                    
                    Timsort排序算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.9" data-path="../Java-Base/插入排序分析与Java实现.html">
            
                <a href="../Java-Base/插入排序分析与Java实现.html">
            
                    
                    插入排序分析与Java实现
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../category/工具与规范.html">
            
                <a href="../category/工具与规范.html">
            
                    
                    工具与规范
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.11.1" data-path="Maven使用技巧汇总.html">
            
                <a href="Maven使用技巧汇总.html">
            
                    
                    Maven使用技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../编码规范/Java编码规范.html">
            
                <a href="../编码规范/Java编码规范.html">
            
                    
                    Java编码规范
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../category/OLAP.html">
            
                <a href="../category/OLAP.html">
            
                    
                    OLAP
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../数据处理/storm学习笔记.html">
            
                <a href="../数据处理/storm学习笔记.html">
            
                    
                    流式计算Storm学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../category/数据运营.html">
            
                <a href="../category/数据运营.html">
            
                    
                    数据运营
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../数据运营/增长黑客数据运营.html">
            
                <a href="../数据运营/增长黑客数据运营.html">
            
                    
                    增长黑客-数据运营
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../category/前端技术栈.html">
            
                <a href="../category/前端技术栈.html">
            
                    
                    前端技术栈
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="../前端/JavaScript设计模式.html">
            
                <a href="../前端/JavaScript设计模式.html">
            
                    
                    JavaScript设计模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.2" data-path="../前端/html相对路径与绝对路径.html">
            
                <a href="../前端/html相对路径与绝对路径.html">
            
                    
                    Html相对路径与绝对路径
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.3" data-path="../前端/微信小程序学习笔记.html">
            
                <a href="../前端/微信小程序学习笔记.html">
            
                    
                    微信小程序学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../category/个人.html">
            
                <a href="../category/个人.html">
            
                    
                    个人
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.15.1" data-path="../个人/简历.html">
            
                <a href="../个人/简历.html">
            
                    
                    简历
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Maven使用技巧</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="maven&#x4F7F;&#x7528;&#x6280;&#x5DE7;&#x6C47;&#x603B;">Maven&#x4F7F;&#x7528;&#x6280;&#x5DE7;&#x6C47;&#x603B;</h1>
<p>&#x6807;&#x7B7E;&#xFF08;&#x7A7A;&#x683C;&#x5206;&#x9694;&#xFF09;&#xFF1A; &#x5DE5;&#x5177;</p>
<hr>
<h2 id="&#x4E00;&#x3001;settingxml&#x914D;&#x7F6E;&#x8BF4;&#x660E;">&#x4E00;&#x3001;Setting.xml&#x914D;&#x7F6E;&#x8BF4;&#x660E;</h2>
<table>
<thead>
<tr>
<th>Setting</th>
<th>Content</th>
</tr>
</thead>
<tbody>
<tr>
<td>localRepository</td>
<td>&#x672C;&#x5730;&#x4ED3;&#x5E93;&#x8DEF;&#x5F84;&#xFF0C;&#x9ED8;&#x8BA4;&#xFF1A;<code>${user.home}/.m2/repository</code></td>
</tr>
</tbody>
</table>
<hr>
<h2 id="&#x4E8C;&#x3001;pomxml&#x914D;&#x7F6E;&#x8BF4;&#x660E;">&#x4E8C;&#x3001;pom.xml&#x914D;&#x7F6E;&#x8BF4;&#x660E;</h2>
<h3 id="21&#x3001;&#x7236;&#x9879;&#x76EE;&#x4E0E;&#x5B50;&#x9879;&#x76EE;&#x7684;version">2.1&#x3001;&#x7236;&#x9879;&#x76EE;&#x4E0E;&#x5B50;&#x9879;&#x76EE;&#x7684;Version</h3>
<p>&#x5B50;&#x9879;&#x76EE;&#x5EFA;&#x8BAE;&#x5728;<code>&lt;parent&gt;</code>&#x4E2D;&#x6307;&#x5B9A;&#x4F7F;&#x7528;&#x7236;&#x9879;&#x76EE;&#x7248;&#x672C;&#x53F7;&#xFF0C;&#x53C2;&#x8003;&#x5982;&#x4E0B;&#x4F8B;&#x5B50;</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">project</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>tg.prj<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>code-web<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>1.0.0-SNAPSHOT<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">modules</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">module</span>&gt;</span>code-contracts<span class="hljs-tag">&lt;/<span class="hljs-name">module</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">module</span>&gt;</span>code-service<span class="hljs-tag">&lt;/<span class="hljs-name">module</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">modules</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">project</span>&gt;</span>
</code></pre>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">project</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">parent</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>code-web<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>tg.prj<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
        <span class="hljs-comment">&lt;!--&#x6307;&#x5B9A;&#x7236;&#x9879;&#x76EE;&#x7248;&#x672C;&#x53F7;--&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>1.0.0-SNAPSHOT<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span> 
    <span class="hljs-tag">&lt;/<span class="hljs-name">parent</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>code-contracts<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">project</span>&gt;</span>
</code></pre>
<h3 id="22&#x3001;&#x4F9D;&#x8D56;&#x673A;&#x5236;">2.2&#x3001;&#x4F9D;&#x8D56;&#x673A;&#x5236;</h3>
<p>&#x9879;&#x76EE;&#x4F9D;&#x8D56;&#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">dependencies</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>log4j<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>log4j<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>1.2.14<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">dependencies</span>&gt;</span>
</code></pre>
<ol>
<li>version&#x6807;&#x7B7E;&#x88AB;&#x5FFD;&#x7565;&#x65F6;&#xFF0C;&#x4F1A;&#x81EA;&#x52A8;&#x5347;&#x7EA7;&#x6700;&#x65B0;&#x7248;&#x672C;&#xFF1B;</li>
<li>&#x7236;&#x9879;&#x76EE;&#x6DFB;&#x52A0;&#x4F9D;&#x8D56;&#x65F6;&#xFF0C;&#x6240;&#x6709;&#x5B50;&#x9879;&#x76EE;&#x90FD;&#x4F1A;&#x589E;&#x52A0;&#x8BE5;&#x4F9D;&#x8D56;&#xFF1B;&#x53CD;&#x4E4B;&#xFF0C;&#x5B50;&#x9879;&#x76EE;&#x6DFB;&#x52A0;&#x4F9D;&#x8D56;&#x53EA;&#x4F1A;&#x4F5C;&#x7528;&#x4E8E;&#x8BE5;&#x5B50;&#x9879;&#x76EE;&#x4E2D;&#xFF1B;</li>
<li>Maven&#x641C;&#x7D22;&#x4F9D;&#x8D56;&#x5305;&#x987A;&#x5E8F;&#xFF1A;&#x672C;&#x5730;&#x4ED3;&#x5E93;--&gt;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;</li>
</ol>
<h3 id="23&#x3001;&#x81EA;&#x5B9A;&#x4E49;&#x5C5E;&#x6027;properties">2.3&#x3001;&#x81EA;&#x5B9A;&#x4E49;&#x5C5E;&#x6027;<code>&lt;properties&gt;</code></h3>
<p>&#x7236;&#x9879;&#x76EE;&#x4E2D;&#x53EF;&#x4EE5;&#x81EA;&#x5B9A;&#x4E49;<code>&lt;properties&gt;</code>&#xFF0C;&#x81EA;&#x8EAB;&#x53CA;&#x5176;&#x5B50;&#x9879;&#x76EE;&#x5747;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;<code>${xxx}</code>&#x8C03;&#x7528;&#xFF0C;&#x53EF;&#x4EE5;&#x5E94;&#x7528;&#x4E8E;&#x591A;&#x9879;&#x76EE;&#x95F4;&#x540C;&#x4E00;&#x4F9D;&#x8D56;&#x5305;&#x7684;&#x7EDF;&#x4E00;&#x7248;&#x672C;&#x3002;&#x4F8B;&#x5982;&#xFF1A;</p>
<pre><code>&lt;!--&#x7236;&#x9879;&#x76EE;--&gt;
&lt;project&gt;
    &lt;properties&gt;
        &lt;doll.version&gt;1.1.7&lt;/doll.version&gt;
    &lt;/properties&gt;
&lt;project&gt;

&lt;!--&#x5B50;&#x9879;&#x76EE;--&gt;
&lt;project&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;tg.prj&lt;/groupId&gt;
            &lt;artifactId&gt;doll-core&lt;/artifactId&gt;
            &lt;version&gt;${doll.version}&lt;/version&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
&lt;project&gt;
</code></pre><h3 id="24&#x3001;dependencymanagementdependencymanagement">2.4&#x3001;dependencyManagement<code>&lt;dependencyManagement&gt;</code></h3>
<p>&#x7236;Maven&#x6A21;&#x5757;&#x4E2D;&#x901A;&#x8FC7;dependencyManagement&#x6765;&#x6307;&#x5B9A;&#x5B50;&#x6A21;&#x5757;&#x4E2D;&#x7684;Maven&#x4F9D;&#x8D56;&#x7248;&#x672C;&#x53F7;&#x3002;</p>
<hr>
<h2 id="&#x4E09;&#x3001;&#x6784;&#x5EFA;&#x4E0E;&#x63D2;&#x4EF6;">&#x4E09;&#x3001;&#x6784;&#x5EFA;&#x4E0E;&#x63D2;&#x4EF6;</h2>
<h3 id="&#x6784;&#x5EFA;jar&#x5305;">&#x6784;&#x5EFA;jar&#x5305;</h3>
<p>&#x4EE5;<code>java -jar</code>&#x542F;&#x52A8;&#xFF0C;&#x53C2;&#x8003;<a href="../Java-Base/Java&#x57FA;&#x7840;.html#&#x547D;&#x4EE4;&#x4E0E;&#x542F;&#x52A8;">java&#x547D;&#x4EE4;&#x4E0E;&#x542F;&#x52A8;</a></p>
<p>&#x6784;&#x5EFA;spring boot&#x5305;&#xFF0C;&#x4F7F;&#x7528;maven&#x63D2;&#x4EF6;&#xFF1A;<strong>spring-boot-maven-plugin</strong></p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">build</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">plugins</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">plugin</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-maven-plugin<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
            #PP&#x4E0E;&#x8C46;&#x82BD;&#x4F7F;&#x7528;&#x7248;&#x672C;1.4.3.RELEASE
            <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>2.0.1.RELEASE<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">executions</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">execution</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">goals</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">goal</span>&gt;</span>repackage<span class="hljs-tag">&lt;/<span class="hljs-name">goal</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">goals</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">execution</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">executions</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">plugin</span>&gt;</span>   
    <span class="hljs-tag">&lt;/<span class="hljs-name">plugins</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">build</span>&gt;</span>
</code></pre>
<p>Spring Boot Maven plugin&#x7684;5&#x4E2A;Goals</p>
<ul>
<li>spring-boot:repackage&#xFF0C;&#x9ED8;&#x8BA4;goal&#x3002;&#x5728;mvn package&#x4E4B;&#x540E;&#xFF0C;&#x518D;&#x6B21;&#x6253;&#x5305;&#x53EF;&#x6267;&#x884C;&#x7684;jar/war&#xFF0C;&#x540C;&#x65F6;&#x4FDD;&#x7559;mvn package&#x751F;&#x6210;&#x7684;jar/war&#x4E3A;.origin</li>
<li>spring-boot:run&#xFF0C;&#x8FD0;&#x884C;Spring Boot&#x5E94;&#x7528;</li>
<li>spring-boot:start&#xFF0C;&#x5728;mvn integration-test&#x9636;&#x6BB5;&#xFF0C;&#x8FDB;&#x884C;Spring Boot&#x5E94;&#x7528;&#x751F;&#x547D;&#x5468;&#x671F;&#x7684;&#x7BA1;&#x7406;</li>
<li>spring-boot:stop&#xFF0C;&#x5728;mvn integration-test&#x9636;&#x6BB5;&#xFF0C;&#x8FDB;&#x884C;Spring Boot&#x5E94;&#x7528;&#x751F;&#x547D;&#x5468;&#x671F;&#x7684;&#x7BA1;&#x7406;</li>
<li>spring-boot:build-info&#xFF0C;&#x751F;&#x6210;Actuator&#x4F7F;&#x7528;&#x7684;&#x6784;&#x5EFA;&#x4FE1;&#x606F;&#x6587;&#x4EF6;build-info.properties</li>
</ul>
<p><img src="assets/1586062608530.png" alt="1586062608530"></p>
<h3 id="&#x6784;&#x5EFA;jar&#x5305;&#x96C6;&#x5408;">&#x6784;&#x5EFA;jar&#x5305;&#x96C6;&#x5408;</h3>
<p>&#x4EE5;<code>java -cp</code>&#x542F;&#x52A8;&#xFF0C;&#x53C2;&#x8003;<a href="../Java-Base/Java&#x57FA;&#x7840;.html#&#x547D;&#x4EE4;&#x4E0E;&#x542F;&#x52A8;">java&#x547D;&#x4EE4;&#x4E0E;&#x542F;&#x52A8;</a></p>
<h3 id="&#x63D2;&#x4EF6;&#x4F7F;&#x7528;&#x7ECF;&#x9A8C;">&#x63D2;&#x4EF6;&#x4F7F;&#x7528;&#x7ECF;&#x9A8C;</h3>
<table>
<thead>
<tr>
<th>&#x63D2;&#x4EF6;</th>
<th>&#x8BF4;&#x660E;</th>
<th>jpress start</th>
<th>tg-service</th>
<th>celebi-service</th>
</tr>
</thead>
<tbody>
<tr>
<td>maven-compiler-plugin</td>
<td>&#x7F16;&#x8BD1;&#x9009;&#x9879;&#xFF0C;jdk&#x7248;&#x672C;&#x3001;UTF8&#x7F16;&#x7801;&#x7B49;</td>
<td>&#x6709;</td>
<td>&#x6709;</td>
<td></td>
</tr>
<tr>
<td>maven-resources-plugin</td>
<td>&#x62F7;&#x8D1D;&#x9759;&#x6001;&#x6587;&#x4EF6;</td>
<td>&#x6709;</td>
<td></td>
<td></td>
</tr>
<tr>
<td>maven-assembly-plugin</td>
<td>&#x6784;&#x5EFA;&#x81EA;&#x5B9A;&#x4E49;&#x7684;&#x6253;&#x5305;&#x7ED3;&#x6784;&#x3001;&#x8F93;&#x51FA;&#x81EA;&#x5B9A;&#x4E49;&#x683C;&#x5F0F;&#x5305;&#xFF0C;&#x5982;zip&#x3001;tar.gz&#x3001;tar&#x7B49;</td>
<td>&#x6709;</td>
<td></td>
<td></td>
</tr>
<tr>
<td>maven-jar-plugin</td>
<td></td>
<td>&#x6709;</td>
<td></td>
<td></td>
</tr>
<tr>
<td>spring-boot-maven-plugin</td>
<td>spring-boot&#x6784;&#x5EFA;&#x5DE5;&#x5177;&#xFF0C;&#x8F93;&#x51FA;jar&#x5305;</td>
<td></td>
<td>&#x6709;</td>
<td>&#x6709;</td>
</tr>
</tbody>
</table>
<h3 id="maven&#x4E0E;classpath">Maven&#x4E0E;classpath</h3>
<p>Java&#x6E90;&#x7801;&#x6587;&#x4EF6;&#x8D44;&#x6E90;&#x5728;Maven&#x5DE5;&#x7A0B;&#x7684;&#x9ED8;&#x8BA4;&#x8DEF;&#x5F84;&#x662F;&#xFF1A;<code>src/main/java</code>&#xFF0C;&#x5176;&#x4ED6;&#x8D44;&#x6E90;&#x6587;&#x4EF6;&#x7684;&#x9ED8;&#x8BA4;&#x8DEF;&#x5F84;&#x662F;<code>src/main/resources</code>&#xFF0C;Maven&#x5728;&#x6253;&#x5305;&#x65F6;&#xFF0C;&#x4F1A;&#x5C06;<code>src/main/resources</code>&#x76EE;&#x5F55;&#x7684;&#x8D44;&#x6E90;&#x6587;&#x4EF6;&#x590D;&#x5236;&#x5230;class&#x76EE;&#x5F55;&#x3002;</p>
<hr>
<h2 id="&#x56DB;&#x3001;maven&#x547D;&#x4EE4;">&#x56DB;&#x3001;Maven&#x547D;&#x4EE4;</h2>
<h3 id="41-&#x66F4;&#x65B0;&#x7236;&#x5B50;&#x6A21;&#x5757;&#x7248;&#x672C;&#x53F7;">4.1 &#x66F4;&#x65B0;&#x7236;&#x5B50;&#x6A21;&#x5757;&#x7248;&#x672C;&#x53F7;</h3>
<p>&#x9996;&#x5148;,&#x9700;&#x8981;&#x6709;&#x4E00;&#x4E2A;packaging&#x7C7B;&#x578B;&#x4E3A;pom&#x7684;pom.xml&#x6587;&#x4EF6;&#x5373;&#x6211;&#x4EEC;&#x7684;parent&#x9879;&#x76EE;pom&#x6587;&#x4EF6;.&#x5728;&#x8FD9;&#x4E2A;parent&#x9879;&#x76EE;&#x4E2D;&#x914D;&#x7F6E;&#x597D;groupId,artifactId,version&#x4EE5;&#x53CA;properties,prerequisites,dependencies.</p>
<p>&#x8FD8;&#x6709;&#x4E00;&#x4E2A;&#x91CD;&#x8981;&#x7684;&#x914D;&#x7F6E;&#x9879;&#x662F;modules.&#x52A0;&#x5165;&#x4E86;&#x8FD9;&#x4E2A;&#x9879;&#x76EE;&#x4E4B;&#x540E;&#x6267;&#x884C;maven&#x7248;&#x672C;&#x53F7;&#x66F4;&#x65B0;&#x65F6;&#x624D;&#x4F1A;&#x540C;&#x65F6;&#x53BB;&#x66F4;&#x65B0;&#x5B50;&#x6A21;&#x5757;&#x7684;&#x7248;&#x672C;&#x53F7;.</p>
<p>&#x5B50;&#x6A21;&#x5757;&#x6539;&#x53D8;&#x7684;&#x90E8;&#x5206;:</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">parent</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.hlf<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>common-parent<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>0.0.1-SNAPSHOT<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">parent</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.hlf<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>projectA<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
</code></pre>
<p>&#x53D1;&#x73B0;&#x6CA1;&#x6709;,&#x5728;&#x8FD9;&#x91CC;&#x53EA;&#x653E;&#x4E86;&#x7236;&#x6A21;&#x5757;&#x7684;version&#x6CA1;&#x6709;&#x653E;&#x5B50;&#x6A21;&#x5757;&#x7684;</p>
<p><code>&gt;mvn versions:set -DnewVersion=0.0.2-SNAPSHOT</code></p>
<h3 id="42-&#x53D1;&#x5E03;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;">4.2 &#x53D1;&#x5E03;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;</h3>
<pre><code>mvn deploy:deploy-file -DgroupId=com.ppmoney.ppcode  -DartifactId=ppcode-contracts -Dversion=1.0.2 -Dpackaging=jar -Dfile=D:\TGProject\ppcode-service\ppcode-contracts\target\ppcode-contracts-1.0.2.jar
-Durl=http://maven.scm.ppmoney.com/content/repositories/PPMoneyRepos/ -DrepositoryId=PPMoneyRepos
</code></pre><p><a href="http://www.cnblogs.com/zbw911/p/6439451.html" target="_blank">http://www.cnblogs.com/zbw911/p/6439451.html</a></p>
<p>deploy 400&#x89E3;&#x51B3;&#x529E;&#x6CD5;&#xFF1A;<a href="http://www.javatang.com/archives/2010/01/23/4518375.html" target="_blank">http://www.javatang.com/archives/2010/01/23/4518375.html</a></p>
<h3 id="43-&#x8FD0;&#x884C;java-main">4.3 &#x8FD0;&#x884C;Java main</h3>
<p>1&#x3001;&#x8FD0;&#x884C;&#x524D;&#x5148;&#x7F16;&#x8BD1;&#x4EE3;&#x7801;&#xFF0C;exec&#xFF1A;java&#x4E0D;&#x4F1A;&#x81EA;&#x52A8;&#x7F16;&#x8BD1;&#x4EE3;&#x7801;&#xFF0C;&#x4F60;&#x9700;&#x8981;&#x624B;&#x52A8;&#x6267;&#x884C;mvn compile&#x6765;&#x5B8C;&#x6210;&#x7F16;&#x8BD1;&#x3002;</p>
<pre><code>mvn compile
</code></pre><p>2&#x3001;&#x7F16;&#x8BD1;&#x5B8C;&#x6210;&#x540E;&#xFF0C;&#x6267;&#x884C;exec&#x8FD0;&#x884C;main&#x65B9;&#x6CD5;&#x3002;
&#x4E0D;&#x9700;&#x8981;&#x4F20;&#x9012;&#x53C2;&#x6570;&#xFF1A;</p>
<pre><code>mvn exec:java -Dexec.mainClass=&quot;com.vineetmanohar.module.Main&quot;  
</code></pre><p>&#x9700;&#x8981;&#x4F20;&#x9012;&#x53C2;&#x6570;&#xFF1A;</p>
<pre><code>mvn exec:java -Dexec.mainClass=&quot;com.vineetmanohar.module.Main&quot; -Dexec.args=&quot;arg0 arg1 arg2&quot;  
</code></pre><p>&#x6307;&#x5B9A;&#x5BF9;classpath&#x7684;&#x8FD0;&#x884C;&#x65F6;&#x4F9D;&#x8D56;&#xFF1A;</p>
<pre><code>mvn exec:java -Dexec.mainClass=&quot;com.vineetmanohar.module.Main&quot; -Dexec.classpathScope=runtime  
</code></pre><hr>
<h3 id="44-&#x8DF3;&#x8FC7;&#x5355;&#x5143;&#x6D4B;&#x8BD5;">4.4 &#x8DF3;&#x8FC7;&#x5355;&#x5143;&#x6D4B;&#x8BD5;</h3>
<p><code>-Dmaven.test.skip=true</code></p>
<h3 id="45-&#x8DF3;&#x8FC7;&#x751F;&#x6210;javadoc">4.5 &#x8DF3;&#x8FC7;&#x751F;&#x6210;javadoc</h3>
<p><code>-Dmaven.javadoc.skip=true</code></p>
<h3 id="46-&#x67E5;&#x770B;maven&#x4F9D;&#x8D56;&#x5173;&#x7CFB;">4.6 &#x67E5;&#x770B;maven&#x4F9D;&#x8D56;&#x5173;&#x7CFB;</h3>
<p><code>mvn dependency:tree</code></p>
<p><code>&#x2013;Dverbose</code>:&#x52A0;&#x4E0A;&#x8FD9;&#x4E2A;&#x53C2;&#x6570;&#xFF0C;&#x53EF;&#x4EE5;&#x5C06;&#x5F53;&#x524D;&#x6240;&#x6709;&#x7684;&#x4F9D;&#x8D56;&#x5173;&#x7CFB;&#x90FD;&#x5C55;&#x793A;&#x51FA;&#x6765;&#xFF0C;&#x5305;&#x62EC;&#x6765;&#x81EA;&#x4E0D;&#x540C;&#x5904;&#x7684;&#x4F9D;&#x8D56;&#x9879;&#x3002;
<code>&#x2013;Dincludes</code>:&#x53EF;&#x4EE5;&#x8FDB;&#x884C;&#x53C2;&#x6570;&#x8FC7;&#x6EE4;&#xFF0C;&#x5982;&#x679C;&#x9700;&#x8981;&#x67E5;&#x8BE2;spring&#x76F8;&#x5173;&#x7684;&#x4F9D;&#x8D56;&#xFF0C;&#x53EF;&#x4EE5;<code>mvn dependency:tree -Dverbose -Dincludes=*spring*:*spring*</code>&#x3002;&#x5F53;&#x7136;&#xFF0C;&#x53EF;&#x4EE5;&#x5C06;&#x8F93;&#x51FA;&#x7ED3;&#x679C;&#x5BFC;&#x5165;&#x5230;&#x6587;&#x672C;&#x4E2D;&#x3002;&#x53EA;&#x9700;&#x8981;&#x5728;&#x547D;&#x4EE4;&#x540E;&#x52A0;&#x5165;&#x201D;&gt;a.txt&#x201D;&#x5373;&#x53EF;&#x3002;</p>
<p><code>mvn help:effective-pom</code>:
&#x4E0A;&#x8FF0;&#x547D;&#x4EE4;&#x53EF;&#x4EE5;&#x5C06;&#x5F53;&#x524D;&#x9879;&#x76EE;&#x81EA;&#x5DF1;&#x7684;POM&#x5DF2;&#x7ECF;&#x4ECE;&#x7236;&#x7C7B;&#x4E2D;&#x7EE7;&#x627F;&#x7684;POM&#x5185;&#x5BB9;&#x8F93;&#x51FA;&#xFF0C;&#x53EF;&#x4EE5;&#x8F93;&#x51FA;&#x5230;&#x6587;&#x672C;&#x4E2D;&#x3002;
mvn help:effective-pom&gt;a.txt</p>
<h3 id="47-&#x6392;&#x9664;&#x4F9D;&#x8D56;">4.7 &#x6392;&#x9664;&#x4F9D;&#x8D56;</h3>
<p>dependency</p>
<p>&#x5728;dependency&#x4E2D;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;exclusions&#x6807;&#x7B7E;&#x8FDB;&#x884C;&#x4F9D;&#x8D56;&#x6392;&#x9664;&#x3002;
&#x4F8B;&#x5982;&#xFF0C;&#x6392;&#x9664;spring</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">exclusions</span>&gt;</span>
   <span class="hljs-tag">&lt;<span class="hljs-name">exclusion</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
   <span class="hljs-tag">&lt;/<span class="hljs-name">exclusion</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">exclusions</span>&gt;</span>
</code></pre>
<p>&#x6392;&#x9664;&#x6240;&#x6709;</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">exclusions</span>&gt;</span>
   <span class="hljs-tag">&lt;<span class="hljs-name">exclusion</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>*<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>*<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
   <span class="hljs-tag">&lt;/<span class="hljs-name">exclusion</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">exclusions</span>&gt;</span>
</code></pre>
<h3 id="48-&#x6784;&#x5EFA;&#x6307;&#x5B9A;&#x9879;&#x76EE;">4.8 &#x6784;&#x5EFA;&#x6307;&#x5B9A;&#x9879;&#x76EE;</h3>
<p>&#x547D;&#x4EE4;&#xFF1A; <code>mvn -pl &lt;arg module name&gt;</code></p>
<p><code>-am --also-make</code>&#xFF1A; &#x540C;&#x65F6;&#x6784;&#x5EFA;&#x6240;&#x5217;&#x6A21;&#x5757;&#x7684;&#x4F9D;&#x8D56;&#x6A21;&#x5757;&#xFF1B;
<code>-amd -also-make-dependents</code>&#xFF1A; &#x540C;&#x65F6;&#x6784;&#x5EFA;&#x4F9D;&#x8D56;&#x4E8E;&#x6240;&#x5217;&#x6A21;&#x5757;&#x7684;&#x6A21;&#x5757;&#xFF1B;
<code>-pl --projects &lt;arg&gt;</code>&#xFF1A; &#x6784;&#x5EFA;&#x5236;&#x5B9A;&#x7684;&#x6A21;&#x5757;&#xFF0C;&#x6A21;&#x5757;&#x95F4;&#x7528;&#x9017;&#x53F7;&#x5206;&#x9694;&#xFF1B;
<code>-rf -resume-from &lt;arg&gt;</code>: &#x4ECE;&#x6307;&#x5B9A;&#x7684;&#x6A21;&#x5757;&#x6062;&#x590D;&#x53CD;&#x5E94;&#x5806;&#x3002;</p>
<p>&#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code>[INFO] Scanning for projects... 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------ 
[INFO] Building dubbo-demo-provider 2.5.4-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ dubbo-demo-provider --- 
[INFO] com.alibaba:dubbo-demo-provider:jar:2.5.4-SNAPSHOT 
[INFO] +- com.alibaba:dubbo-demo-api:jar:2.5.4-SNAPSHOT:compile 
[INFO] +- com.alibaba:dubbo:jar:2.5.4-SNAPSHOT:compile 
[INFO] |  \- commons-logging:commons-logging:jar:1.1.1:compile 
[INFO] +- org.springframework:spring:jar:2.5.6.SEC03:compile 
[INFO] +- org.javassist:javassist:jar:3.15.0-GA:compile 
[INFO] +- org.jboss.netty:netty:jar:3.2.5.Final:compile 
[INFO] +- org.apache.mina:mina-core:jar:1.1.7:compile 
[INFO] +- org.glassfish.grizzly:grizzly-core:jar:2.1.4:compile 
[INFO] |  +- org.glassfish.grizzly:grizzly-framework:jar:2.1.4:compile 
[INFO] |  |  \- org.glassfish.gmbal:gmbal-api-only:jar:3.0.0-b023:compile 
[INFO] |  |     \- org.glassfish.external:management-api:jar:3.0.0-b012:compile 
[INFO] |  +- org.glassfish.grizzly:grizzly-portunif:jar:2.1.4:compile 
[INFO] |  \- org.glassfish.grizzly:grizzly-rcm:jar:2.1.4:compile
</code></pre><h3 id="49-install&#x4E0E;package&#x7684;&#x533A;&#x522B;&#x53CA;&#x6267;&#x884C;&#x8FC7;&#x7A0B;">4.9 install&#x4E0E;package&#x7684;&#x533A;&#x522B;&#x53CA;&#x6267;&#x884C;&#x8FC7;&#x7A0B;</h3>
<p><code>mvn clean package</code>&#x4F9D;&#x6B21;&#x6267;&#x884C;&#x4E86;clean&#x3001;resources&#x3001;compile&#x3001;testResources&#x3001;testCompile&#x3001;test&#x3001;war(jar)(&#x6253;&#x5305;)&#xFF17;&#x4E2A;&#x9636;&#x6BB5;;</p>
<p><code>mvn clean install</code>&#x4F9D;&#x6B21;&#x6267;&#x884C;&#x4E86;clean&#x3001;resources&#x3001;compile&#x3001;testResources&#x3001;testCompile&#x3001;test&#x3001;war(jar)(&#x6253;&#x5305;)&#x3001;install8&#x4E2A;&#x9636;&#x6BB5;;</p>
<p> <code>maven-war-plugin</code>&#x5C06;&#x5DE5;&#x7A0B;&#x6253;&#x5305;&#x6210;war&#xFF0C;&#x800C;maven-install-plugin&#x4F1A;&#x5C06;&#x6253;&#x597D;&#x7684;war&#x5305;&#x653E;&#x5165;&#x672C;&#x5730;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x7684;maven&#x7248;&#x672C;&#x5E93;&#x4E2D;&#x3002;</p>
<h3 id="410-&#x6267;&#x884C;mainclass">4.10 &#x6267;&#x884C;MainClass</h3>
<p><code>man compile</code></p>
<p><code>mvn exec:java -Dexec.mainClass=&#x201C;com.vineetmanohar.module.Main&#x201D; -Dexec.args=&#x201C;arg0 arg1 arg2&#x201D;</code></p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; tgor.top 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2020-04-23 15:32:53
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../category/工具与规范.html" class="navigation navigation-prev " aria-label="Previous page: 工具与规范">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../编码规范/Java编码规范.html" class="navigation navigation-next " aria-label="Next page: Java编码规范">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Maven使用技巧","level":"1.11.1","depth":2,"next":{"title":"Java编码规范","level":"1.11.2","depth":2,"path":"编码规范/Java编码规范.md","ref":"编码规范/Java编码规范.md","articles":[]},"previous":{"title":"工具与规范","level":"1.11","depth":1,"path":"category/工具与规范.md","ref":"category/工具与规范.md","articles":[{"title":"Maven使用技巧","level":"1.11.1","depth":2,"path":"工具/Maven使用技巧汇总.md","ref":"工具/Maven使用技巧汇总.md","articles":[]},{"title":"Java编码规范","level":"1.11.2","depth":2,"path":"编码规范/Java编码规范.md","ref":"编码规范/Java编码规范.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["chapter-fold","splitter","tbfed-pagefooter","page-toc-button","-search","search-pro","popup","back-to-top-button","code","copy-code-button"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy tgor.top 2019","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"splitter":{},"search-pro":{"cutWordLib":"nodejieba","defineWord":["Gitbook Use"]},"popup":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"fontsettings":{"theme":"sepia","family":"serif","size":1},"highlight":{},"page-toc-button":{"maxTocDepth":2,"minTocSize":2},"back-to-top-button":{},"copy-code-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"tgor","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"tgor note","gitbook":"*","description":"tgor生活工作记录"},"file":{"path":"工具/Maven使用技巧汇总.md","mtime":"2020-04-23T07:32:53.389Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-04-29T08:43:24.127Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

